package com.tfj.mvp.tfj.home;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.google.gson.TypeAdapter;
import com.hyphenate.tfj.R;
import com.jakewharton.rxbinding2.view.RxView;
import com.tfj.comm.bean.Constant;
import com.tfj.mvp.base.BaseFragment;
import com.tfj.mvp.tfj.home.adapter.HouseDataAdapter;
import com.tfj.mvp.tfj.home.bean.HomeLiveBean;
import com.tfj.mvp.tfj.home.bean.HouseDataBean;
import com.tfj.mvp.tfj.home.bean.TypeListBean;
import com.tfj.utils.NoScrollViewManager;

import java.util.List;
import java.util.concurrent.TimeUnit;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;


@SuppressLint("ValidFragment")
public class VFragmentType extends BaseFragment {
    @BindView(R.id.recyclerView_List)
    RecyclerView recyclerViewList;
    private List<HouseDataBean> houseDataBeans;

    public static VFragmentType getInstance(List<HouseDataBean> homeLiveBeans) {
        VFragmentType sf = new VFragmentType();
        sf.houseDataBeans = homeLiveBeans;
        return sf;
    }

    public VFragmentType(List<HouseDataBean> homeLiveBeans) {
        this.houseDataBeans = homeLiveBeans;
    }

    public VFragmentType() {

    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }


    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        NoScrollViewManager linearLayoutManager = new NoScrollViewManager(getActivity());
        recyclerViewList.setLayoutManager(linearLayoutManager);
        HouseDataAdapter houseDataAdapter = new HouseDataAdapter(getActivity());
        recyclerViewList.setAdapter(houseDataAdapter);
        houseDataAdapter.replaceData(houseDataBeans);
    }

    @Override
    public void createPresenter() {

    }

    @Override
    protected void initView() {

    }

    @Override
    public int getLayoutRes() {
        return R.layout.fragment_rank_list;
    }
}